﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data.Common;
using System.Data;

namespace Light.Data
{
   /// <summary>
   /// 封装查询命令的类
   /// </summary>
   public  class DbWrapCommand
    {
       public DbWrapCommand()
       {
       }
       public DbWrapCommand(string commandText,DbParameter[] parameters,DataTable data)
       {
           this._commandText = commandText;
           this._dbParameters = parameters;
           this._data = data;
       }
      private string _commandText = null;
      private DbParameter[] _dbParameters = null;
      private DataTable _data = null;
      /// <summary>
      /// 查询的Command
      /// </summary>
      public string CommandText
      {
          get
          {
              return _commandText;
          }
          set
          {
              _commandText = value;
          }
      }
       /// <summary>
       /// 查询参数
       /// </summary>
      public DbParameter[] DbParameters
      {
          get
          {
              return _dbParameters;
          }
          set
          {
              _dbParameters = value;
          }
      }
      /// <summary>
      /// 数据源
      /// </summary>
      public DataTable Data
      {
          get
          {
              return _data;
          }
          set
          {
              _data = value;
          }
      }
    }
}
